package com.getan.boot.controller;

import com.getan.boot.common.ResponseBuilder;
import com.getan.boot.common.ResponseCodeData;
import com.getan.boot.common.monitor.Server;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 服务器监控
 *
 * @author Bruce.Gong
 * @since 1.0.0-SNAPSHOT
 */
@RestController
@RequestMapping("/monitor")
public class MonitorController {

    @PostMapping("server")
    public ResponseCodeData<Server> info() {
        Server server = new Server();
        server.info();
        return ResponseBuilder.ok(server);
    }

}
